using System.Web.Mvc;
using DesigningViews.Models;

namespace DesigningViews.Controllers
{
	public class ProductAfterController : Controller
	{
		public ViewResult Index()
		{
			var products = new[]
				{
					new Product {Name = "Wii", Price = 249.99m},
					new Product {Name = "XBox 360", Price = 299.99m},
					new Product {Name = "PS3", Price = 899.99m}
				};

			return View(products);
		}

		public ViewResult Edit(int id)
		{
			var product = new Product {Name = "Wii", Price = 249.99m};

			return View(product);
		}
	}
}